package com.ruoyi.exam.domain.entity;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;

/**
 * 任务执行列对象 t_task_exe
 * 
 * @author ruoyi
 * @date 2024-12-19
 */
public class TTaskExe extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键，任务用户绑定ID */
    private Long id;

    /** 任务ID，关联 t_task 表主键 */
    @Excel(name = "任务ID，关联 t_task 表主键")
    private Long taskId;

    /** 用户ID，关联 sys_user 表主键 */
    @Excel(name = "用户ID，关联 sys_user 表主键")
    private Long userId;

    private String nickName; // 用户名称
    private String deptName; // 用户名称
    private Long deptId; // 用户手机号
    /** 任务状态，0，未完成，1，已完成 */
    @Excel(name = "任务状态，0，未完成，1，已完成")
    private Long taskStatus;

    /** 任务答卷ID，关联 t_task_exam_paper_answer 表主键 */
    @Excel(name = "任务答卷ID，关联 t_task_exam_paper_answer 表主键")
    private Long taskExamPaperAnswerId;

    /** 绑定时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date bindTime;

    /** 是否删除(0未删除 1已删除) */
    private Integer deleted;

    private List<Long> userIds; // 用户ID列表

    private TTask task; // 任务对象

    /** 任务名称(查询用) */
    private String taskName;

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    private TTaskExamPaperAnswer taskExamPaperAnswer; // 答卷对象

    public TTaskExamPaperAnswer getTaskExamPaperAnswer() {
        return taskExamPaperAnswer;
    }

    public void setTaskExamPaperAnswer(TTaskExamPaperAnswer taskExamPaperAnswer) {
        this.taskExamPaperAnswer = taskExamPaperAnswer;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    private SysUser sysUser;

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    // 任务完成数量
    private Integer completeNum;

    // 任务总数量
    private Integer totalNum;

    public Integer getCompleteNum() {
        return completeNum;
    }

    public void setCompleteNum(Integer completeNum) {
        this.completeNum = completeNum;
    }

    public Integer getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }

    public TTask getTask() {
        return task;
    }

    public void setTask(TTask task) {
        this.task = task;
    }

    public List<Long> getUserIds() {
        return userIds;
    }

    public void setUserIds(List<Long> userIds) {
        this.userIds = userIds;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setTaskStatus(Long taskStatus) {
        this.taskStatus = taskStatus;
    }

    public Long getTaskStatus() {
        return taskStatus;
    }

    public void setTaskExamPaperAnswerId(Long taskExamPaperAnswerId) {
        this.taskExamPaperAnswerId = taskExamPaperAnswerId;
    }

    public Long getTaskExamPaperAnswerId() {
        return taskExamPaperAnswerId;
    }

    public void setBindTime(Date bindTime) {
        this.bindTime = bindTime;
    }

    public Date getBindTime() {
        return bindTime;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getDeleted() {
        return deleted;
    }

    /** 分页参数 */
    // private Integer pageNum = 1;
    // private Integer pageSize = 10;

    // public Integer getPageNum() {
    // return pageNum;
    // }

    // public void setPageNum(Integer pageNum) {
    // this.pageNum = pageNum;
    // }

    // public Integer getPageSize() {
    // return pageSize;
    // }

    // public void setPageSize(Integer pageSize) {
    // this.pageSize = pageSize;
    // }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("taskId", getTaskId())
                .append("userId", getUserId())
                .append("taskStatus", getTaskStatus())
                .append("taskExamPaperAnswerId", getTaskExamPaperAnswerId())
                .append("bindTime", getBindTime())
                .append("deleted", getDeleted())
                .toString();
    }
}
